$INCLUDE: 'C:\FG\FASTGRAF.FI'

      PROGRAM MAIN

      INTEGER COLORS
      PARAMETER (COLORS=256)

      INTEGER BASE
      INTEGER COLOR
      INTEGER MODE
      INTEGER X
      INTEGER FG_GETMODE

      CALL FG_INITPM
      MODE = FG_GETMODE()
      CALL FG_SETMODE(19)

      X = 0

      DO 10 COLOR = 0,COLORS-1
         CALL FG_SETCOLOR(COLOR)
         CALL FG_RECT(X,X,0,199)
         X = X + 1
10    CONTINUE
      CALL FG_WAITKEY

      CALL FG_SETMODE(MODE)
      CALL FG_RESET

      STOP ' '
      END
